package com.matrix.basecore.utils

import android.graphics.Rect
import android.view.View
import androidx.annotation.NonNull
import androidx.recyclerview.widget.RecyclerView

class SpacesItemDecoration(top: Int, left: Int, right: Int, bottom: Int) :
    RecyclerView.ItemDecoration() {
    private var top = 0
    private var left = 0
    private var right = 0
    private var bottom = 0

    init {
        this.top = top
        this.left = left
        this.right = right
        this.bottom = bottom
    }

//    fun SpacesItemDecoration(devide: Int) {
//        this.top = devide
//        this.left = devide
//        this.right = devide
//        this.bottom = devide
//    }

    override fun getItemOffsets(
        outRect: Rect,
        view: View,
        parent: RecyclerView,
        state: RecyclerView.State
    ) {
        outRect.right = right
        outRect.top = top
        outRect.left = left
        outRect.bottom = bottom
    }
}